Masthead

Digitizing II: Rooms at CPH

Introduction

For this lab, you'll be digitizing a portion of the CPH campus for use in a CPH online map. You'll want to take your time and carefully digitize the features. To make sure the digitizing is done well, you'll be working in groups of two and then QAQCing each others work. We'll be digitizing in the same way you did for your island so part of this process is already familiar to you. However, we'll need to carefully digitize on top of a raster to have high quality data.

For 2023:

Previous classes have digitized a large amount of data for the campus but only a subset of the rooms inside the buildings. The goal this semester will be to add the rooms in buildings that are of the most interest to students. I'm assuming these are the buildings that contain class rooms.

QAQC

Go to the web page for the websites that are maintained by the Institute for Spatial Analysis Mapping and Modeling (ISAMM). Scroll down and click on the "New CPH Map". This is a map of campus that contains a lot of spatial data, most of which was contributed by CPH students.

Eventually, we want to have all the rooms on campus digitized but that is a lot of rooms. For this semester, the goal is to make sure we have all of the floors that contain rooms that are used for teaching. First, we need to determine which buildings and which floors have been covered. There is a spreadsheet that documents this but we probably should not fully trust a spreadsheet from two years ago that was updated in a quick, 1 week lab. So we'll assign a building or two (based on size) to pairs of students and then check the status of buildings against the existing CPH map. The spreadsheet is named "FloorplanList.gsheet" and is on GoogleDrive at:

G:\Shared drives\Graham Lab\Projects\HSU Web Map

Our first step is to go through the buildings in the spreadsheet and make sure that all the buildings that typically have classes are labeled as having classes (i.e. have "Yes" in the "Has Classes" column. Then, your team should add your name next to one of the buildings and check it on the map. If all the floors rooms look good, indicate that it is " QAQCed" in the "Room Status" column and then you'll want to start digitizing the rooms for the building.

As you digitize the rooms, make sure to update the "Rooms" sheet in the spreadsheet file.

Please add notes on anything that is amiss and your name as the QAQCer.

Georeferencing an Image

If you need to digitize the rooms for a floor of building, you'll need a PDF of the layout of the floor. There are some PDFs of the building layouts in the new GSP database at:

\\storage.humboldt.edu\Academic\GSP-Database\Schools\Cal Poly Humboldt, Arcata, CA\Built Environment\Buildings\FloorPlans

You can also download layouts from the Facilities Link website. Please note that there is a specified format for the file names which is <BuildingName><BuildingLetter>-<FloorNumber>.<Extension>. In other words, the layout for Art A, floor 1 would be "ArtA-1.pdf". Not that G and B are used sometimes as floor numbers.

A PDF is not much good to use in a GIS application so we'll need to convert it to a JPG and then georeference it to the earth.

  1. Open the PDF in Acrobat and zoom to make the layout as large as possible on your screen.
  2. Use the SnipIt tool to take a screen shot and save it as a JPG image with an appropriate name (e.g. ArtA-1.jpg)
  3. Drag and drop the JPG image into a map in ArcGIS Pro.
  4. Right now the image does not have a defined spatial reference system so it will appear off the coast of Africa.
  5. In the Analysis tab, open the Tools panel (which will be called Geoprocessing).
  6. Search for Define Projection
  7. Load the 3" Arcata Data so you have a high accuracy dataset to georeference to.
  8. Select the Define Projection tool and project the JPG file to match the 3" Arcata Data..
  9. Now examine where your file is located on your map. If a raster file does not have a spatial reference, GIS applications will assume a location that is wrong! We fix this by georeferencing the image to the earth.
  10. Go to the web and search for "arcgis pro georeferencing". This will take you to the help pages from Esri on georeferencing.
  11. The steps below will take you through the process a bit faster but remember the pages above in case you need them in the future.
  12. Zoom into the building your are going to digize floors for.
  13. Make sure to select the layout image rather than the 3" Arcata data for the next steps.
  14. In the Imagery tab, click on "Georeference"
  15. Click "Set SRS"
  16. Click on the layout raster and click "Fit to Display". The layout raster should appear in your display over the location it needs to be georeferenced to, however, the fit will be very rough.
  17. Click on the Appearance tab and change the Transparency so you can see the building through the layout.
  18. Click on "Add Control Points".
  19. Click on a building corner in your layout image (called "source" in ArcGIS terms) and make the layout hidden and click on the corresponding building corner in the Arcata image. When you make the layout visible, you should see the image shift.
  20. If you have a very rectangular building, you might be able to georeference it with just 4 corners. However, it typical takes 6 to 12.
  21. If you need to pan the map while georeferencing, hold down the "C" key and you'll see the mouse cursor become a hand. Then you can press and pan the map.
  22. Georeferencing can be done with a number of different mathematical functions and these are available in the "Transformations" menu. Since these images are for buildings with straight lines, you might want to stay with the 1st Order Polygon.

Don't worry if you need to do this several times. Get a feel for the number of points that are needed and feel free to just number the files (e.g. "ArtB-1_1.tif", "ArtB-1_2.tif") as needed.

Digitizing

  1. Create a polygon shapefile for the rooms in one of the floors for your building and name the shapefile with "<building>_<floor>.shp". For the first floor of the Forestry Building, this would be "Forestry_1.shp". For Natural Resources second floor, this would be "NaturalResources_1.shp". Please remove the spaces from the building names and use underscores to separate the floor number from the name. Just use "B" for floors that are basements.
  2. Digize each of the rooms in the floor. Trace over the inside inner edge of the wall of the room. Trace across openings like doors.
  3. Add a "Name" attribute to the shapefile for the of the name of the room and then add the room name to the appropriate attribute. Examples include:
    1. 104
    2. 101B
    3. Womens restroom
    4. 108 Mechanical
  4. Add a "Description" attribute to the shapefile for any additional description information you'd like to include.
  5. When done, save the data to the Working folder in:
    1. 2023 GSP 510 -> HSUData -> 2_Working -> Buildings -> <BuildingName>
  6. Where <BuildingName> is the name of your building
  7. Next, create a polyline shapefile and name it "Entrances". Add the entrances to the building. We are planning on using an arrow that points into the building where the entrances are so please digitize from about 5 meters (15 feet) from the building toward the entrance and perpendicular to it.
  8. Save this shapefile into the <BuildingName> folder
  9. Each group should be able to finish at least two floors but some buildings are simpler than others so you may be able to create more. However, reworking data is often as hard as doing it right the first time so please make sure you digitizing accurate.
  10. Finally, make sure to add the appropriate meta-data to your files. Using the ArcGIS Pro meta-data editor, make sure all the red "x"s are gone by filling in appropriate values for the meta data.

Metadata

The following steps will guide you through completing the "required" metadata from Esri and adding documentation for attributes including their units .

  1. In ArcGIS Pro, first make sure that you have closed all editing sessions and stopped georeferencing.
  2. Select the "Project" tab and then "Options".
  3. Scroll down to "Metadata" and select it.
  4. Select one of the ISO191115 "Metadata styles". This style includes fields form the International Standards Organization (IS0) version of FGDC metadata specification but it is in an Esri format. If you are ever required to provide true ISO or FGDC metadata, you'll need to do a conversion..
  5. Go to the Catalog in ArcGIS Pro. Note that there are options for metadata available when you right click on a layer in the Table of Contents but these are for metadata about the layer which I have never seen used. To edit the metadata for a feature layer (shapefile or raster), we need to use Catalog.
  6. Right click on the shapefile for the rooms in Catalog and select "Edit Metadata". You should see a window appear with the contents of the ISO metadata file on the left and red "x"s next to the elements that are required. Notice that the required items are also listed at the top of the panel for the currently selected element and the boxes where information is required are in red.
  7. In the "Overview" section:
    1. Add appropriate text to the boxes that are in red (i.e. "Title" should have a good title for the dataset and the "Description" should describe how it was created and for what purpose).
    2. As you enter the information and then move the next box to enter more data, the red should disappear. From here, your goal is to get rid of the red!
    3. In "Topics & Keywords", just select an appropriate "Topic Category".
    4. In "Citation", you'll need to click on the arrow next to "Dates" and then enter one or more dates.
  8. In the "Metadata" section:
    1. In "Details" select the language used for the metadata.
    2. In "Contacts", click on "New Contact" and enter your information.
    3. I do not require this but in a professional situation, you'll want to open "Contact Information" and provide appropriate information for them to contact you or another organizational representative.
  9. In the "Resource" section:
    1. In "Details", select the language used in the attributes.
    2. In "Extents", click on "New Extent". Typically you'll want to include a geography bounding box as this is a universal way to describe the location of the data and it will not change if the data is projected to another spatial reference.
    3. Click on "New Bounding Box".
    4. Click on the "Map" tab and make sure that the box showing the current coordinate at the bottom of the map is in decimal degrees. If not, right click on the arrow next to it and select "Decimal Degrees".
    5. Right click in the map near one of the corners of an imaginary bounding box that would surround your data and select "Copy Coordinate".
    6. Return to the metadata editor and paste the coordinate into "West". You'll need to remove the degree symbol and the "N" and "W" characters, convert the longitude to a negative number, and copy the coordinate value into the appropriate text box. Repeat this for the corner opposite the first one in your bounding box.
    7. At this point, all the red "x"s should be gone but we still need to add a description of our attributes and especially the units for the attribute values.
    8. Select "Fields" in the "Resource" section and then add a "New Entity and Attributes Details".
    9. A shapefile may have different types of features such as roads and trails. These are referred to as "entities" in the FGDC specification. For this shapefile, you can just have one entity, "Rooms". Since we only have rooms in this dataset "Definition" and "Definition Source" are really more than we need for this project so just enter "CPH Web Map Project" for both.
    10. For each attribute that you added (i.e. you do not have to add FID, Shape, or Id):
      1. Add a "New Attribute"
      2. The "Label" is the name of the attribute.
      3. The "Definition" and "Definition Source" can both be something like "CPH Web Map Project"
      4. The "Type" will be one of: Long, Text, Float, Double, Short, Long, or Date.
      5. The Width should be 254 or "Text" and blank for the other types but the editor will not allow a blank field so just add 1.
      6. Add a "New Range Domain" for any attribute values that you need to include units (i.e. area, length). This step is only needed if you added measured values to the dataset.
      7. The "Minimum" and "Maximum" fields have to be numbers with the minimum being less than the maximum. For attributes like area, just enter 0 for the minimum and a really large number for the maximum (it would be great if the editor supported "Infinity" but it does not).
      8. Enter the appropriate "Units" (e.g. "meters", "feet", etc.).

Deploying (Optional)

We'll need to project the data to Web Mercator and then store the data in the web map folder and link it to the website.

  1. Open QGIS.
  2. Drag and drop your data into QGIS.
  3. Right click on the layer and select "Export-> Save Features As".
  4. Select "GeoJSON" or geographic JavaScript Object Notation as the file type. This is the main file format for vector spatial data on the web and is increasing in popularity in other areas.
  5. Save the file to your lab folder with the name matching the room and floor as above and ending in ".geojson".
  6. Click on the world icon to the right of the CRS pop up.
  7. Enter "web" in the search field.
  8. Select WGS_1984_Web_Mercato_Auxillary_Sphere and click "OK".
  9. Click OK
  10. Go to the folder were you saved your geojson file and open it in Notepad.
  11. The GeoJSON file is contains very similar data to a shapefile but in a different format and all in one file. Also, it is a text file which makes it slower for computers to read and write but much easier for humans to read.
    1. The "type" is the type of file as GeoJSON files can contain just one "Point" or an entire "FeatureCollection"
    2. FeatureCollections have an array of features and each feature has properties (attributes in GIS) and a geometry.
    3. The properties are organized in a JSON object (see W3Schools for more info) where each entry has a "key" and a "value". The keys are the names of the attributes and the values are the values for the attributes.
    4. The geometry can be a number of different types but each contains arrays of coordinates with the points that make up the geometry. The different types of geometries are defined by the Well-known text representation of geometry (or WKT). Don't worry if you have not heard of it, very few folks outside of the GIS open source world have.
    5. In addition, the JSON file can have additional entries:
      1. Name: typically matches the name of the file
      2. crs: Coordinate reference system (aka spatial reference system). There are a number of accepted formats for this but many of the have EPSG codes which are well defined.
  12. Since the geojson file is just one file, you can turn it in without zipping it.

Additional Resources

 

Creating Reports in MS-Word

© Copyright 2018 HSU - All rights reserved.